import { request } from 'umi';
/** 获取用户信息 GET /api/admin/user/userManage */
export async function getSearch(params?: Admin.UserQueryParams, options?: { [key: string]: any }) {
  return request<Admin.PageQueryVO<Admin.CurrentUser>>('/api/admin/user/userManage', {
    method: 'GET',
    params:params,
    ...(options || {}),
  });
}
/** 删除用户信息 GET /api/admin/user/delUser/ */
export async function deleteUser(id:number,options?: { [key: string]: any }) {
  return request<boolean>('/api/admin/user/delUser/'+id,{
    method: 'GET',
    ...(options||{}),
  })
}
/** 新增用户信息 POST /api/admin/user/saveUser */
export async function saveUser(params:Admin.CurrentUser,options?: { [key: string]: any }) {
  return request<boolean>('/api/admin/user/saveUser',{
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data:params,
    ...(options||{}),
  })
}
/** 修改用户信息 POST /api/admin/user/update */
export async function updateUser(params:Admin.UserParam,options?: { [key: string]: any }){
  return request<boolean>('/api/admin/user/update',{
    method:'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data:params,
    ...(options||{}),
  })
}
